package com.huanletao.spring.data;

import com.huanletao.spring.data.dao.ResumeRepository;
import com.huanletao.spring.data.pojo.Resume;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * 测试spring-data-jpa 使用；
 *
 * description: demo <br>
 * date: 2022/7/7 11:44 <br>
 * author: 踏雪无痕 <br>
 * version: 1.0 <br>
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringDataJpaConfig.class)
public class demo {
    @Autowired
    ResumeRepository resumeRepository;

    @Autowired
    JdbcTemplate jdbcTemplate;

    @Test
    public void test01(){
        List<Resume> all = resumeRepository.findAll();


        System.out.println("all = " + all);

        jdbcTemplate.execute("select * from user");



    }
}
